package com.zack.gank.gankandroid.main.find.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Android on 2017/7/13.
 */
public class FindAdapter extends FragmentPagerAdapter {

    private List<Fragment> list;
    private List<String> listTitle;
    public FindAdapter(FragmentManager fm, List<Fragment> list,List<String> listTitle) {
        super(fm);
        this.list = list;
        this.listTitle=listTitle;
    }

    @Override
    public Fragment getItem(int position) {
        return  list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return listTitle.get(position);
    }
}
